import { defHttp } from "/@/utils/http/axios"

export const pageTenantUser = (params) => {
  return defHttp.get({ url: "/iam-service/tenantUser/pageUser", params })
}

export const getTenantUser = (params) => {
  return defHttp.get({ url: "/iam-service/tenantUser/getUser", params })
}

export const updateTenantUser = (params) => {
  return defHttp.post({ url: "/iam-service/tenantUser/updateUser", params })
}

export const saveUser = (params) => {
  return defHttp.post({ url: "/iam-service/tenantUser/addUser", params })
}


export const updateStatus = (params) => {
  return defHttp.post({ url: "/iam-service/tenantUser/updateStatus", params }, { joinParamsToUrl: true })
}


export const deleteTenantUser = (params, handleSuccess) => {
  return defHttp.delete({ url: "/iam-service/tenantUser/deleteUser", data: params }, { joinParamsToUrl: true }).then(() => {
    handleSuccess()
  })
}


/**
 * 修改密码
 * @param params
 */
export const updatePassword = (params) => {
  return defHttp.post({ url: "/iam-service/tenantUser/updatePassword", params }, { isTransformResponse: false })
}
